import Login from './views/Login.vue'
import NotFound from './views/404.vue'
import Home from './views/Home.vue'
import Main from './views/Main.vue'
import Table from './views/nav1/Table.vue'
import Form from './views/nav1/Form.vue'
import user from './views/nav1/user.vue'
import Page4 from './views/nav2/Page4.vue'
import Page5 from './views/nav2/Page5.vue'
import Page6 from './views/nav3/Page6.vue'
import echarts from './views/charts/echarts.vue'
//--------------组织机构--------------------
//部门
import Department from "./views/system/Department";
//员工
import Employee from "./views/system/Employee";
//店铺
import Shop from "./views/system/Shop";
//店铺入驻
import shopRegister from "./views/ShopRegister";
//套餐
import Meal from "./views/system/Meal";

//--------------权限平台---------------------
//角色
import Role from "./views/auth/Role"
//权限
import Permission from "./views/auth/Permission";
//菜单
import Menu from "./views/auth/Menu";


//--------------车辆管理---------------------
//激活页面
import Activation from "./views/Activation";


//没有权限
import NoPermission from "./views/NoPermission"
import SysConfig from "./views/system/SysConfig";


let routes = [
    {
        path: '/',
        component: Home,
        name: '首页',
        iconCls: 'fa fa-bar-chart',
        leaf: true,
        children: [
            { path: '/echarts', component: echarts, name: '首页' }
        ]
    },
    {
        path: '/login',
        component: Login,
        name: '',
        hidden: true
    },
    {
        path: '/active',
        component: Activation,
        name: '',
        hidden: true
    },
    {
        path: '/shopRegister',
        component: shopRegister,
        name: '',
        hidden: true
    },
    {
        path: '/404',
        component: NotFound,
        name: '',
        hidden: true
    },
    {
        path: '/',
        component: Home,
        name: '组织机构管理',
        iconCls: 'el-icon-message',//图标样式class
        children: [
            { path: '/department', component: Department, name: '部门管理' },
            { path: '/employee', component: Employee, name: '员工管理' },
            { path: '/shop', component: Shop, name: '店铺管理' },
            { path: '/meal', component: Meal, name: '租户套餐管理' },
            { path: '/config', component: SysConfig, name: '系统管理' },
            { path: '/NoPermission', component: NoPermission, name: '', hidden: true}
        ]
    },{
        path: '/',
        component: Home,
        name: '权限管理',
        iconCls: 'el-icon-message',//图标样式class
        children: [
            { path: '/permission', component: Permission, name: '权限管理' },
            { path: '/role', component: Role, name: '角色管理' },
            { path: '/menu', component: Menu, name: '菜单管理' },
        ]
    }, {
        path: '*',
        hidden: true,
        redirect: { path: '/404' }
    }
];

export default routes;